def flatten_text(data):
    """递归提取所有键值对，带上键名，拼接为一条语义更丰富的字符串"""
    texts = []

    def extract(value, key_prefix=""):
        if isinstance(value, dict):
            for k, v in value.items():
                extract(v, key_prefix + k + " ")
        elif isinstance(value, list):
            for v in value:
                extract(v, key_prefix)
        elif isinstance(value, (str, int, float)):
            # 将键名作为上下文保留
            if key_prefix:
                texts.append(f"{key_prefix.strip()}：{value}")
            else:
                texts.append(str(value))

    extract(data)
    return " ".join(texts)
